<?php

namespace Kollway\Logger\Controllers;

use Illuminate\Routing\Controller;

class LoggerController extends Controller
{
    public function logger()
    {
        $list = \DB::table('logger')->orderBy('id', 'desc')
            ->paginate(20);

        return view('logger::logger', compact('list'));
    }

    // 清空 logger 表
    public function clearLog()
    {
        \DB::table('logger')->delete();
        \Cache::pull('_log_count');
    }
}